﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace SCP_UNA_MVC.Libs
{
    public class StringArray
    {

        public List<string> StringToArray(string valor, string separador)
        {
            string[] listaValores = valor.Split(separador.ToCharArray(), StringSplitOptions.RemoveEmptyEntries);

            return listaValores.ToList();
        }

        public string ArrayToString<T>(IList<T> array, string separador)
        {

            string listaString = (string.Join(separador, array.ToArray()));

            return listaString;
        }
    }
}